/*
 * Created by JFormDesigner on Thu Dec 12 23:42:48 CST 2024
 */

package com.hafu.view;

import com.hafu.view.kehu.AddKeHuFrm;
import com.hafu.view.kehu.ManageKeHuFrm;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.GroupLayout;

/**
 * @author DELL
 */
public class MainFrm extends JFrame {
    public MainFrm() {
        initComponents();
    }

    private void KeHubutton1(ActionEvent e) {
        // TODO add your code here 跳转到添加客户界面
        AddKeHuFrm addKeHufrm = new AddKeHuFrm();
        addKeHufrm.setVisible(true);
    }

    private void KeHubutton2(ActionEvent e) {
        // TODO add your code here 跳转到管理客户界面
        ManageKeHuFrm manageKeHufrm = new ManageKeHuFrm();
        manageKeHufrm.setVisible(true);
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents  @formatter:off
        KeHubutton1 = new JButton();
        KeHubutton2 = new JButton();

        //======== this ========
        Container contentPane = getContentPane();

        //---- KeHubutton1 ----
        KeHubutton1.setText("\u589e\u52a0\u5ba2\u6237");
        KeHubutton1.addActionListener(e -> KeHubutton1(e));

        //---- KeHubutton2 ----
        KeHubutton2.setText("\u7ba1\u7406\u5ba2\u6237");
        KeHubutton2.addActionListener(e -> KeHubutton2(e));

        GroupLayout contentPaneLayout = new GroupLayout(contentPane);
        contentPane.setLayout(contentPaneLayout);
        contentPaneLayout.setHorizontalGroup(
            contentPaneLayout.createParallelGroup()
                .addGroup(contentPaneLayout.createSequentialGroup()
                    .addGap(52, 52, 52)
                    .addComponent(KeHubutton1)
                    .addGap(36, 36, 36)
                    .addComponent(KeHubutton2)
                    .addContainerGap(291, Short.MAX_VALUE))
        );
        contentPaneLayout.setVerticalGroup(
            contentPaneLayout.createParallelGroup()
                .addGroup(contentPaneLayout.createSequentialGroup()
                    .addGap(120, 120, 120)
                    .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
                        .addComponent(KeHubutton2)
                        .addComponent(KeHubutton1))
                    .addContainerGap(269, Short.MAX_VALUE))
        );
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents  @formatter:on
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables  @formatter:off
    private JButton KeHubutton1;
    private JButton KeHubutton2;
    // JFormDesigner - End of variables declaration  //GEN-END:variables  @formatter:on
}
